package C_Paper;

import java.util.Scanner;

public class C100_4 {
    //最长子字符串
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String x = sc.next();
        int sum = 0;
        for (int i = 0; i < x.length(); i++) {
            if (x.charAt(i) == 'o'){
                sum++;
            }
        }
        System.out.println(sum % 2 == 0 ? x.length() : x.length() - 1);
    }
}
